import java.util.ArrayList;
public class MyNewStack{
	private int[] arr;
	private int top;
	public void push(int a) {
		//把值存到栈中去了
		//top++;
		//arr[top] = a;
		arr[++top] = a;
	}
		//弹出栈的值
	public int pop() {
		//int a = arr[top];
	//	top--;
		return arr[top--];
		
		
	}
	public int peek()
	{return arr[top];}
	
	public void print() {
		for (int i = 0; i < top; i++) {
			System.out.println(arr[i]);
			
		}
	}
	public static void main(String[] args) {
		MyNewStack stack = new MyNewStack();
		stack.push(1);
		stack.push(3);
		stack.push(5);
		stack.push(7);
		stack.push(9);
		
		ArrayList<Object> list = new ArrayList<>();
		list.add(1);
		list.get(0);
	}
		
	}
